.optionContainer {
  list-style-type: none;

  .optionElement {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    padding: 10px 0px 10px 0px;

    &.showColumn {
      flex-direction: column;
      .optionForm {
        margin: 0px;
      }
    }

    .optionText {
      flex: 1;
      p {
        margin: 0px;
      }
      .caption {
        font-size: 13px;
        font-weight: 400;
        color: var(--sub-text);
        white-space: pre-wrap;
      }
      a {
        color: var(--highlight);
        text-decoration: none;
        &:hover {
          text-decoration: underline;
        }
      }
    }
    .optionForm {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      margin-inline-start: 10px;
    }
    &.buttonsContainer {
      justify-content: flex-start;
    }
  }
  .childElements {
    padding-inline-start: 20px;
    border-inline-start: solid 10px var(--line);
  }
}

fieldset {
  border: none;
  padding: 0;
  margin: 0;
}

.noDisplayLegend {
  width: 0;
  height: 0;
  overflow: hidden;
}

/*new, updated*/
.new > .optionElement p:nth-child(1)::after,
.updated > .optionElement p:nth-child(1)::after {
  color: var(--new);
  font-size: 14px;
  border: 1px solid var(--new);
  border-radius: 2px;
  padding: 0px 5px;
  margin-left: 5px;
}
.updated > .optionElement p:nth-child(1)::after {
  content: "Updated";
}
.new > .optionElement p:nth-child(1)::after {
  content: "New";
}

/*forms*/
input,
textarea {
  font-family: inherit;
  font-size: 14px;
  background-color: var(--sub-bg);
  color: var(--main-text);
}

textarea {
  -moz-appearance: textfield;
  border: 1px var(--button) solid;
  border-radius: 2px;
  padding-inline-start: 5px;
  padding-inline-end: 5px;
  padding: 5px;
  width: calc(100% - 12px) !important;
  height: 50px;
  min-height: 50px;
  &:hover,
  &:focus {
    border-color: var(--highlight);
  }
}

input[type="number"],
input[type="text"],
input[type="color"] {
  -moz-appearance: textfield;
  width: 50px;
  height: 30px;
  padding-inline-start: 5px;
  padding-inline-end: 5px;
  border: 1px solid var(--button);
  border-radius: 2px;

  &:hover,
  &:focus {
    border-color: var(--highlight);
  }
}

input[type="text"] {
  width: 200px;
}
.noHover {
  pointer-events: none;
}

/*checkbox*/

input[type="checkbox"] {
  opacity: 0;
  position: absolute;
  &:checked + .checkbox {
    color: var(--highlight);
    &::after {
      content: "";
      display: block;
      position: absolute;
      top: 1px;
      inset-inline-start: 4px;
      width: 6px;
      height: 14px;
      transform: rotate(40deg);

      .rtl-language & {
        transform: rotate(40deg) scaleX(-1);
      }

      border-bottom: 3px solid var(--highlight);
      border-inline-end: 3px solid var(--highlight);
    }
  }
  &:focus + .checkbox::before {
    border-color: var(--highlight);
  }
}

.checkbox {
  padding-inline-start: 20px;
  position: relative;
  cursor: pointer;
  &::before {
    content: "";
    display: block;
    position: absolute;
    top: 0;
    inset-inline-start: -2px;
    width: 20px;
    height: 20px;
    border: 1px solid var(--button);
    border-radius: 2px;
  }
  &:hover::before {
    border-color: var(--highlight);
  }
}

/*radio*/

input[type="radio"] {
  opacity: 0;
  position: absolute;
  &:checked + .radio {
    color: var(--highlight);
  }
  &:checked + .radio::after {
    content: "";
    display: block;
    position: absolute;
    top: 6px;
    inset-inline-start: 4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--highlight);
  }
  &:focus + .radio::before {
    border-color: var(--highlight);
  }
}

.radio {
  padding-inline-start: 20px;
  position: relative;
  cursor: pointer;
  &::before {
    content: "";
    display: block;
    position: absolute;
    top: 0;
    inset-inline-start: -2px;
    width: 20px;
    height: 20px;
    border: 1px solid var(--button);
    border-radius: 50%;
  }
  &:hover::before {
    border-color: var(--highlight);
  }
}

/*color*/

input[type="color"] {
  background-color: var(--main-bg);
  padding: 5px;
}

/*select*/

select {
  background-color: var(--sub-bg);
  color: var(--main-text);
  -moz-appearance: none;
  -webkit-appearance: none;
  text-overflow: ellipsis;
  border: var(--button) solid 1px;
  border-radius: 2px;
  padding: 3px 5px;
  padding-inline-end: 20px;
  width: 100%;
  height: 30px;
  scrollbar-color: var(--button) var(--line);
  &:hover,
  &:focus {
    border: var(--highlight) solid 1px;
  }
}

.selectWrap {
  position: relative;
  &:before {
    pointer-events: none;
    content: "";
    z-index: 1;
    position: absolute;
    top: 35%;
    inset-inline-end: 7px;
    width: 5px;
    height: 5px;

    transform: rotate(45deg);

    .rtl-language & {
      transform: rotate(-45deg);
    }

    border-bottom: 2px solid var(--sub-text);
    border-inline-end: 2px solid var(--sub-text);
  }
  &:hover::before {
    border-bottom: 2px solid var(--highlight);
    border-inline-end: 2px solid var(--highlight);
  }
}

option {
  font-family: inherit;
  font-size: 14px;
}

/*button*/

input[type="button"],
.button {
  min-width: 100px;
  text-align: center;
  padding: 5px;
  height: 30px;
  font-size: 13px;
  color: var(--main-text);
  border: 1px solid var(--button);
  border-radius: 2px;
  background-color: var(--line);
  cursor: pointer;
  white-space: nowrap;
  &:hover,
  &:focus {
    background-color: var(--button);
    border-color: var(--highlight);
  }
  &.includeSpan {
    padding: 0px;
    height: 30px;
    box-sizing: border-box;
    span {
      width: fit-content;
      padding: 0px 5px;
    }
  }
}
.button {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  &:focus-within {
    background-color: var(--button);
    border-color: var(--highlight);
  }
}

input[type="file"] {
  -moz-appearance: none;
  -webkit-appearance: none;
  opacity: 0;
  width: 1px;
  height: 0;
}

.keyboardShortcut {
  position: relative;

  .row {
    display: flex;
    align-items: center;
  }

  button {
    position: absolute;
    border: none;
    padding: 0;
    background-color: rgba(0, 0, 0, 0);
    cursor: pointer;
    height: 20px;
    svg {
      width: 20px;
      height: 20px;
    }

    &.clearButton {
      inset-inline-end: 0px;
      margin: 3px;
      svg {
        fill: var(--sub-text);
      }
      &:hover svg {
        fill: var(--new);
      }
    }

    &.resetButton {
      inset-inline-end: -20px;
      margin: -3px;
      svg {
        fill: var(--sub-text);
        path {
          stroke: var(--sub-text);
        }
      }
      &:hover svg {
        fill: var(--highlight);
        path {
          stroke: var(--highlight);
        }
      }
    }
  }

  input {
    &::placeholder {
      color: #fff;
    }
    &:focus::placeholder {
      color: var(--main-text);
    }
  }

  &.isError input {
    border-color: var(--new);
  }

  .error {
    position: absolute;
    margin: 0;
    width: 100%;
    font-size: 12px;
    color: var(--new);
    text-align: center;
    white-space: nowrap;
  }
}

iframe {
  border: none;
  width: 100%;
}
